package com.zhixing.map.domain.dto;

import com.zhixing.common.domain.entity.DriverInfo;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class DriverLocationDTO {

    /**
     * 城市代码
     * @example 1100
     */
    @NotEmpty(message = "城市代码不能为空")
    @Pattern(regexp = "^\\d{4}$", message = "城市代码格式错误")
    private String cityCode;

    /**
     * 经度
     * @example 116.397477
     */
    @NotNull(message = "起点经度不能为空")
    @DecimalMin(value = "-180", message = "经度不能小于-180")
    @DecimalMax(value = "180", message = "经度不能大于180")
    private BigDecimal longitude;

    /**
     * 纬度
     * @example 39.908692
     */
    @NotNull(message = "起点纬度不能为空")
    @DecimalMin(value = "-90", message = "纬度不能小于-90")
    @DecimalMax(value = "90", message = "纬度不能大于90")
    private BigDecimal latitude;

    /**
     * 司机信息
     * example { "driverId": 1, diverStatus": 0 }
     */
    @NotNull(message = "司机信息不能为空")
    private DriverInfo driverInfo;
}
